cmake_minimum_required(VERSION 3.10)

project(lib_demo)

## 创建静态库
add_library(demo_static STATIC lib_string.c)

## 创建动态库
add_library(demo_shared SHARED lib_string.c)

## 设置静态库的名称
set_target_properties(demo_static PROPERTIES OUTPUT_NAME "demo")

## 设置动态库的名称
set_target_properties(demo_shared PROPERTIES OUTPUT_NAME "demo")

set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)